﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Amazon;
using Amazon.Runtime;
using Amazon.Auth;
using Amazon.S3;
using Amazon.SecurityToken;
using System.Security.Cryptography;

namespace Utilities
{
    public sealed class AWSAuthentication
    {
        private readonly string secret_key;
        private readonly string access_key;
        private readonly bool IsOnline;
        private readonly AWSCredentials credentials;

        public AWSAuthentication() { }

        public AWSAuthentication(string secret_key, string access_key)
        {
            this.secret_key = secret_key;
            this.access_key = access_key;
        }

        public string GetSecretKey() { return secret_key; }
        public string GetAccessKey() { return access_key; }


        public void Authenticate(bool IsSecureString = false)
        {
            try
            {
                AWSCredentials basic_credentials = new BasicAWSCredentials(access_key, secret_key, IsSecureString);                                
            }
            catch (Exception aws)
            {
                AWSLogger.Write("Authentication Failed.", aws);
            }
        }

        public AWSCredentials GetAWSCredentials()
        {
            return credentials;
        }
    }
}
